package com.cs.study.homework._0316;

import java.util.*;

public class Demo2 {
    public static void main(String[] args) {
        HashMap<String, Integer> map = new HashMap<>();
        map.put("ls", 1);
        map.put("sd", 7);
        map.put("rt", 9);
        map.put("kj", 2);
        map.put("dh", 12);
        map.put("yh", 5);
        map.put("ad", 7);


        Collection<Integer> collection = map.values();
        Iterator<Integer> iterator = collection.iterator();
        while (iterator.hasNext()){
            int i = iterator.next();
            if (i == 7||i==9){
                iterator.remove();
            }
        }
        System.out.println(map);
    }
}
